package com.liuxw.www.bean;

public class JsonResult {
    private boolean isSuccess;
    private Long total;
    private Object data;

    public JsonResult() {
        this.setSuccess(Boolean.TRUE);
    }

    public JsonResult(Boolean bool) {
        this.setSuccess(bool);
    }

    public JsonResult(Object data) {
        this();
        this.setData(data);
    }

    public JsonResult(Object data, Long total) {
        this();
        this.setData(data);
        this.setTotal(total);
    }

    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean success) {
        isSuccess = success;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "JsonResult{" +
                "isSuccess=" + isSuccess +
                ", total=" + total +
                ", data=" + data +
                '}';
    }
}
